package com.example.springbootdemo.mapper;

import com.example.springbootdemo.dto.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("SELECT id,name from t_user where id=#{id}")
    User getById(@Param("id") int id);
    @Select("SELECT id,name from t_user")
    List<User> getAllUsers();
}
